<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>学分借条</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link type="text/css" rel="stylesheet" href="css/app.css" />
		<link type="text/css" rel="stylesheet" href="css/mui.min.css" />
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/iscroll.js"></script>
		<script type="text/javascript" src="js/mui.js"></script>
		<script type="text/javascript">
			function GetQueryString(name)
			{
			     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			     var r = window.location.search.substr(1).match(reg);
			     if(r!=null)return  unescape(r[2]); return null;
			}
			var message=GetQueryString("message");
			if(message != undefined){
				alert(decodeURI(message));
			}
			var pageIndex=1;
			$(function(){
				$(document).scroll(function(e){
					if($(document).height() - $(document).scrollTop() - window.innerHeight <100 ){
					  load();
			        } 
				});
				var search=GetQueryString("search");
				if(search != undefined){
					$("#search").val(search);
				}
				mui.init({
					swipeBack: true //启用右滑关闭功能
				});
				load();
			});
			function adminSearch(){
				$("#list").html("");
				load();
			}
			function load(){
				$.ajax(
					{
						url:"userList.do",
						async:false,
						cache:false,
						data:{
							name:$("#name").val(),
							id:$("#id").val(),
							search:$("#search").val(),
							type:$("#type").val(),
							page:pageIndex
						},
						success: function(html){
							if(html != ''){
								$("#list").append(html);
					 			pageIndex++; 
							}
			      		}
			      	});
			}
		</script>
		<style>
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
		</style>
	</head>
	
	<body>
		<div class="mui-content">
			<div class="title">
				<div style="float: left;">姓名搜索：</div>
				<div class="mui-input-row mui-search">
					<input type="search" class="mui-input-clear" id="name" name="name" placeholder="" data-input-clear="1" data-input-search="1">
				</div>
				<div style="float: left;">身份证搜索：</div>
				<div class="mui-input-row mui-search">
					<input type="search" class="mui-input-clear" id="id" name="id" placeholder="" data-input-clear="1" data-input-search="1">
				</div>
				<div style="float: left;">全文搜索：(微信号，手机号，支付宝号)</div>
				<div class="mui-input-row mui-search">
					<input type="search" class="mui-input-clear" id="search" name="search" placeholder="" data-input-clear="1" data-input-search="1">
				</div>
				<div style="float: left;">用户类型：</div>
				<div class="mui-input-row mui-search">
					<select id="type" name="type">
						<option value="">所有</option>
						<option value="1">借款人</option>
						<option value="2">中介人</option>
						<option value="3">出借人</option>
					</select>
				</div>
				
				<button onclick="adminSearch()">搜索</button>
			</div>
			<ul class="mui-table-view" id="list">
				
			</ul>
		</div>
	</body>
</html>
